/***************************************************************
*  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
*  All rights reserved.
*
*  This file is part of the GroupMe! Project. Source code of 
*  this project is closed and redistribution of this code is
*  prohibited. 
*  
*  Contact: http://www.groupme.net
*
*  This copyright notice MUST APPEAR in all copies of the file!
***************************************************************/
package net.groupme.logging;

/**
 * created on Sep 20, 2007
 * 
 * This is a factory class for creating GroupMe Loggers that store
 * user events into e.g. a database. GroupMe! Logging can be adjusted 
 * via a property file (see <i>groupmelogging.properties</i>)
 * 
 * @author Fabian Abel, <a href="mailto:abel@l3s.de">abel@l3s.de</a>
 * @author last edited by: $Author: fabian $
 * 
 * @version $Revision: 1.1 $ $Date: 2007-09-20 16:10:29 $
 */
public class GroupMeLoggerFactory {

	/** indicates if GroupMe! logging is activated in general */
	private static boolean loggingActivated = new Boolean(GroupMeLoggingPropertyManager.getString("logging.overall.enabled")); //$NON-NLS-1$
	
	/**
	 * This method returns a GroupMe Logger that can be used to log navigational events like search...
	 * @return a GroupMe Logger that can be used to log navigational events like search...
	 */
	public static GroupMeNavigationLogger getNavigationLogger(){
		if(loggingActivated){
			return new GroupMeLoggerDBImpl();
		}else{
			return new GroupMeDummyLogger();
		}
	}
}
